home *** CD-ROM | disk | FTP | other *** search
- /** SendASCII.vlt
- *
- * VLT ASCII send test.
- *
- **/
- /*
- * Get last file sent
- */
- filename = getenv(vltasciifilnam)
- dirname = ""
- /*
- * Break up into file and dir
- */
- nf = lastpos("/", filename)
-
- if nf = 0 then do
- nf = lastpos(":", filename)
- if nf ~= 0 then do
- dirname = substr(filename, 1, nf)
- filename = substr(filename, nf + 1)
- end
- end
- else do
- dirname = substr(filename, 1, nf - 1)
- filename = substr(filename, nf + 1)
- end
- /*
- * Ask for file
- */
- filename = GetFile(50,50,dirname,filename,"Enter File Name",VLT)
- if filename = "" then exit
- /*
- * Save filename to env var.
- */
- call setenv(vltasciifilnam, filename)
-
- /*
- * Find out the current settings
- */
- 'extract transferprotocol'
- 'extract currentxpr'
- /*
- * Select current transfer protocol
- */
- 'xpr select xprascii.library'
- 'transfer protocol external'
- 'xpr init 50'
- 'file send 'filename
- /*
- * Set protocol back to previous
- */
- 'xpr select 'VLT.currentxpr
- 'transfer protocol 'VLT.transferprotocol
- exit
-
-